<template>
	<!-- 资产页面 -->
	<view class="asset">
		<view class="user-info">

			<view class="user-info-hd" @click="gouserInfo">
				<image src="../../../static/public/img/sz.png" style="width: 22px;height: 22px;"></image>
			</view>
			<view class="user-info-bd">
				<view class="avatar">
					<image src="../../../static/public/img/40.jpg" style="width: 60px;height: 60px;border-radius:55px">
					</image>
				</view>
				<dl>
					<dt><span class="user-name">{{data.name}} &nbsp;&nbsp;</span>
						<!---->
					</dt>
					<dd><span class="user-name"></span></dd>
				</dl>
			</view>
		
		</view>
		
		<view class="property-info">
			<view class="wealth">账户总资产(元)</view>
			<view style="text-align: center;font-size: 25px;color:#f8d49e;margin-top:15px;border-bottom: 0.013333rem dashed #f8d49e;padding-bottom: 10%;width: 90%;margin-left: 5%;">
				{{data.money}}</view>
			<image src="../../../static/public/img/jy.png"
				style="width:100px;height: 100px;    height: 30px;width: 75px;position: absolute;right: 2px;top: 20px;" @click="goaccountDetail()">
			</image>
			<view @click="gopay" style="width:40%;height: 45px;background: linear-gradient(180deg,#625138,#463c2f);color:#f8d49e;font-size: 11px;line-height: 45px;margin-left: 5%;text-align: center;border-radius: 10px;float:left;margin-top: 5%;">
				<image src="../../../static/public/img/ck1 (1).png"
					style="width: 25px;height:25px;vertical-align:middle"></image>
				<text>存款</text>
			</view>
		
			<view @click="gowithdraw" style="width:40%;height: 45px;background: linear-gradient(180deg,#625138,#463c2f);color:#f8d49e;font-size: 11px;line-height: 45px;margin-left: 10%;text-align: center;border-radius: 10px;float:left;margin-top: 5%;">
				<image src="../../../static/public/img/ck1 (1).png"
					style="width: 25px;height:25px;vertical-align:middle"></image>
				<text>取款</text>
			</view>
		</view>

		<view class="group order-links">
			<h3 class="group-title">投资记录</h3>
			<view class="grid" style="color:#d0b285;">
				<view class="grid-item" @click="gobetList(1)">
					<image src="../../../static/public/img/qb.png" style="width: 50px;height:50px;"></image>
					<p>全部</p>
				</view>
				<view class="grid-item" @click="gobetList(2)">
					<image src="../../../static/public/img/dqr.png" style="width: 50px;height:50px;"></image>
					<p>待确认</p>
				</view>
				<view class="grid-item" @click="gobetList(3)">
					<image src="../../../static/public/img/hl.png" style="width: 50px;height:50px;"></image>
					<p>获利</p>
				</view>
			</view>
		</view>
		
		<view style="width:100%;background: #1a1a1c;">
			<view style="width:90%;margin-left: 5%;height80px;height: 55px;line-height: 55px;" @click="gopayrecord">
				<image src="../../../static/public/img/ckjl.png" style="width: 30px;height:30px;float:left;margin-top: 12px;"></image>
				<view style="float:left;width:85%;font-size: 12px;color:#999;">存款记录</view>
				<image src="../../../static/public/img/xia.png" style="width: 20px;height:20px;float:left;margin-top: 18px;"></image>
			</view>
			<view style="width:90%;margin-left: 5%;height80px;height: 55px;line-height: 55px;border-top: 1px solid rgb(67 63 63);" @click="gowithdrawRecord">
				<image src="../../../static/public/img/qkjl.png" style="width: 30px;height:30px;float:left;margin-top: 12px;"></image>
				<view style="float:left;width:85%;font-size: 12px;color:#999;">取款记录</view>
				<image src="../../../static/public/img/xia.png" style="width: 20px;height:20px;float:left;margin-top: 18px;"></image>
			</view>
		</view> 
		
		<view style="width:100%;background: #1a1a1c;margin-top: 3%;margin-bottom: 10%;">
<!-- 			<view style="width:90%;margin-left: 5%;height80px;height: 55px;line-height: 55px;" @click="gonotice">
				<image src="../../../static/public/img/grxx.png" style="width: 30px;height:30px;float:left;margin-top: 12px;"></image>
				<view style="float:left;width:85%;font-size: 12px;color:#999;">个人信息</view>
				<image src="../../../static/public/img/xia.png" style="width: 20px;height:20px;float:left;margin-top: 18px;"></image>
			</view> -->
			<view style="width:90%;margin-left: 5%;height80px;height: 55px;line-height: 55px;border-top: 1px solid rgb(67 63 63);" @click="gotodayProfit">
				<image src="../../../static/public/img/qkjl.png" style="width: 30px;height:30px;float:left;margin-top: 12px;"></image>
				<view style="float:left;width:85%;font-size: 12px;color:#999;">今日盈亏</view>
				<image src="../../../static/public/img/xia.png" style="width: 20px;height:20px;float:left;margin-top: 18px;"></image>
			</view>
			<view style="width:90%;margin-left: 5%;height80px;height: 55px;line-height: 55px;border-top: 1px solid rgb(67 63 63);" @click="goaccountSafe">
				<image src="../../../static/public/img/zhaq.png" style="width: 30px;height:30px;float:left;margin-top: 12px;"></image>
				<view style="float:left;width:85%;font-size: 12px;color:#999;">账户安全</view>
				<image src="../../../static/public/img/xia.png" style="width: 20px;height:20px;float:left;margin-top: 18px;"></image>
			</view>
			<view style="width:90%;margin-left: 5%;height80px;height: 55px;line-height: 55px;border-top: 1px solid rgb(67 63 63);">
				<image src="../../../static/public/img/zxkf.png" style="width: 30px;height:30px;float:left;margin-top: 12px;"></image>
				<view style="float:left;width:85%;font-size: 12px;color:#999;">在线客服</view>
				<image src="../../../static/public/img/xia.png" style="width: 20px;height:20px;float:left;margin-top: 18px;"></image>
			</view>
			<view style="width:90%;margin-left: 5%;height80px;height: 55px;line-height: 55px;border-top: 1px solid rgb(67 63 63);" @click="gosetting">
				<image src="../../../static/public/img/sz2.png" style="width: 30px;height:30px;float:left;margin-top: 12px;"></image>
				<view style="float:left;width:85%;font-size: 12px;color:#999;">设置</view>
				<image src="../../../static/public/img/xia.png" style="width: 20px;height:20px;float:left;margin-top: 18px;"></image>
			</view>
		</view> 

		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data:[]
			}
		},
		methods: {
		  gouserInfo(){
			  uni.navigateTo({
			  	url:'/pages/components/userInfo/userInfo'
			  })
		  },
          gosetting(){
			  uni.navigateTo({
			  	url:'/pages/components/setting/setting'
			  })
		  },
		  gobetList(e){
			  uni.navigateTo({
			  	url:'/pages/components/betList/betList'
			  })
		  },
		  gopayrecord(){
			  uni.navigateTo({
			  	url:'/pages/components/payRecord/payRecord'
			  })
		  },
		  gopay(){
			  uni.navigateTo({
			  	url:'/pages/components/pay/pay'
			  })
		  },
		  gowithdrawRecord(){
			  uni.navigateTo({
			  	url:'/pages/components/withdrawRecord/withdrawRecord'
			  })
		  },
		  gotodayProfit(){
			  uni.navigateTo({
			  	url:'/pages/components/todayProfit/todayProfit'
			  })
		  },
		  gowithdraw(){
			  uni.navigateTo({
			  	url:'/pages/components/withdraw/withdraw'
			  })
		  },
		  goaccountSafe(){
			  uni.navigateTo({
			  	url:'/pages/components/accountSafe/accountSafe'
			  })
		  },
		  gonotice(){
			  uni.navigateTo({
			  	url:'/pages/components/notice/notice'
			  })
		  },
		  goaccountDetail(){
			  uni.navigateTo({
			  	url:'/pages/components/accountDetail/accountDetail'
			  })
		  },
		  user(){
			  this.$api.request('/api/user').then((res)=>{
				  this.data = res.data
			  })
		  }
		},
		onShow() {

		},
		onLoad() {
			this.user()
		}

	}
</script>

<style lang="scss">
	page {
		background-color: #121213;
	}

	.asset {
		.user-info {
			position: relative;
			overflow: hidden;
			z-index: 1;
			top: 0;
			background-image: linear-gradient(90deg,#f7ce94,#d49b54);
			border-radius: 0 0 40px 40px;
			height: 135px;
			padding-top: 15px;
		}

		.user-info-hd {
			position: absolute;
			top: 22px;
			right: 15px;
			overflow: hidden;
		}

		.user-info-bd {
			display: -webkit-box;
			display: -webkit-flex;
			display: flex;
			-webkit-box-align: center;
			-webkit-align-items: center;
			align-items: center;
			padding: 1px 17px 0px;
		}

		.property-info {
			position: relative;
			overflow: hidden;
			margin: 0px 15px 10px;
			border-radius: 10px;
			background: #1a1a1c;
			line-height: 1;
			padding-bottom: 30px;
			padding-top: 2%;
			z-index:999;
			top: -55px;
		}

		.user-info-bd .avatar {
			float: left;
			width: 60px;
			height: 60px;
			margin-bottom: 13px;
			margin-right: 15px;
		}

		.property-info .wealth {
			margin-top: 0.533333rem;
			color: #fff;
			text-align: center;
			font-size: 12px;
		}

		.group {
			margin: -14% 15px 10px;
			background: #1a1a1c;
			border-radius: 0.266667rem;
			overflow: hidden;
		}

		.grid {
			display: -webkit-box;
			display: -webkit-flex;
			display: flex;
		}

		.grid {
			-webkit-justify-content: space-around;
			justify-content: space-around;
			text-align: center;
			padding-top: 4%;
			padding-bottom: 5%;
		}

		.grid-item {
			-webkit-box-flex: 1;
			-webkit-flex: 1;
			flex: 1;
			display: block;
			padding: 0.16rem 0;
			background-clip: content-box;
			font-size: 13px;

		}

		.group-title {
			margin: 0 20px;
			height: 35px;
			line-height: 35px;
			border-bottom: 1px solid #313133;
			font-weight: 400;
			color: #dca662;
			font-size: 12px;
		}
		


	}
</style>
